<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
      <el-form-item label="被取保候审人(被行政拘留人)" prop="hsr">
        <el-input v-model="queryParams.hsr" placeholder="请输入被取保候审人(被行政拘留人)" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="案件编号">
        <el-input v-model="queryParams.ajbh" placeholder="请输入案件编号" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="决定文书号">
          <el-input v-model="queryParams.sqwsh" placeholder="请输入决定文书号" clearable @keyup.enter.native="handleQuery" />
        </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="!form.xh" @click="handleUpdate">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="!form.xh" @click="handleDelete">删除</el-button>
      </el-col>
      <!-- <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" :disabled="!form.xh" @click="handleExport">打印通知书</el-button>
      </el-col> -->
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" height="650" :data="bzjtableList" :row-class-name="tableRowClassName"
      @current-change="tableCurrentChange"  @row-dblclick="doubleclick">
      <!-- <el-table-column type="selection" width="55" align="center" /> -->
      <el-table-column label="序号" align="center" prop="xh" />
      <el-table-column label="案件编号" align="center" prop="ajbh" />
      <el-table-column label="案件名称" align="center" prop="ajmc" />
      <el-table-column label="收取法律文书号" align="center" prop="sqwsh" width="180" />
      <!-- <el-table-column label="票据编号" align="center" prop="billNo" width="120" /> -->
      <el-table-column label="取保候审人" align="center" prop="hsr" width="120" />
      <el-table-column label="行政拘留人" align="center" prop="xjr" width="120" />
      <el-table-column label="性别" align="center" prop="xb" width="55" />
      <el-table-column label="出生日期" align="center" prop="csrq" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.csrq, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <!-- <el-table-column label="住址" align="center" prop="zz" width="220" /> -->
      <el-table-column label="户籍户籍地址" align="center" prop="hjdz" />
      <!-- <el-table-column label="单位及职务" align="center" prop="dwzw" width="120" /> -->
      <el-table-column label="联系电话" align="center" prop="lxdh" width="120" />
      <el-table-column label="身份证号" align="center" prop="sfzh" width="200" />
      <el-table-column label="案件性质" align="center" prop="ajxz" width="180" />
      <el-table-column label="保证金金额" align="center" prop="sqje" width="120" />
      <el-table-column label="收费方式" align="center" prop="sqfs" />
      <el-table-column label="填报人" align="center" prop="sqtfr" />
      <el-table-column label="填报时间" align="center" prop="sqtfsj" width="180" />
      <!-- <el-table-column label="批准人" align="center" prop="pzr" /> -->
      <el-table-column label="批准时间" align="center" prop="pzsj" width="180" />
      <el-table-column label="办案人" align="center" prop="bar" />
      <el-table-column label="办案人" align="center" prop="sq_barlxdh" />
      <!-- <el-table-column label="办案人所在单位编号" align="center" prop="dwbh" width="180"/> -->
      <el-table-column label="办案单位" align="center" prop="badw" />
      <el-table-column label="填报时间" align="center" prop="sqtfsj" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.sqtfsj, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
    <!-- 添加或修改【请填写功能名称】对话框 -->
    <el-dialog :title="tit" :visible.sync="open" width="60%" @closed="gb" >
      <el-form ref="forms"  :model="form" :rules="ruless" label-width="auto" :hide-required-asterisk="true" class="creation demo-form-inline">
        <el-row :gutter="20">
          <el-col :span="24">

          <el-divider content-position="center">案件信息</el-divider>
          </el-col>
        <el-col :span="12" >
        <el-form-item label="案件编号" prop="ajbh">
          <el-input v-model="form.ajbh" placeholder="请输入案件编号" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="案件名称" prop="ajmc">
          <el-input v-model="form.ajmc" placeholder="请输入案件名称" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="案件性质" prop="ajxz" style="width: 100%">
          <!-- <el-input v-model="form.ajxz" placeholder="请输入案件性质" /> -->
          <selectMultiple ref="selectMultiple" :options="directoryList" @selectVal="selectVal" :multiple="false"
            :isTree="true" selectableRange="code"  style="width: 100%"></selectMultiple>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="决定文书号" prop="sqwsh">
          <el-input v-model="form.sqwsh" placeholder="请输入决定文书号" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="办案人" prop="bar">
          <el-input v-model="form.bar" placeholder="请输入办案人" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="办案人联系电话" prop="sq_barlxdh">
          <el-input v-model="form.sq_barlxdh" placeholder="请输入办案人联系电话" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <!-- <el-form-item label="办案人所在单位编号" prop="dwbh">
          <el-input v-model="form.dwbh" placeholder="请输入办案人所在单位编号" />
        </el-form-item>-->
        <el-form-item label="办案单位" prop="badw">
          <el-select v-model="form.badw" placeholder="请选择办案单位" style="width: 100%">
            <el-option 
            v-for="item in options"
              :key="item.id" 
              :label="item.name" 
              :value="item.name"
            />
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="24">

      <el-divider content-position="center">个人信息</el-divider>
      </el-col>
      <el-col :span="12">
        <el-form-item label="被取保候审人(被行政拘留人)" prop="hsr">
          <el-input  v-model="form.hsr" placeholder="请输入被取保候审人(被行政拘留人)" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="人员类别" prop="xjr">
          <el-select v-model="form.xjr" placeholder="请选择人员类别"  style="width:100%">
            <el-option v-for="item in [{ id: 1, name: '被取保候审人' }, { id: 2, name: '被行政拘留人' }]" :key="item.id" :label="item.name"
              :value="item.name"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="身份证号" prop="sfzh">
          <el-input v-model="form.sfzh" placeholder="请输入身份证号" style="width: 100%" @input="parseIdCard"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="护照号" prop="hsrhz">
          <el-input v-model="form.hsrhz" placeholder="请输入护照号" style="width: 100%"/>
        </el-form-item>
      </el-col>
     <el-col :span="12">
        <el-form-item label="性别" prop="xb">
          <el-select v-model="form.xb" placeholder="请选择性别"  style="width:100%">
            <el-option v-for="item in [{ id: 1, name: '女' }, { id: 2, name: '男' }]" :key="item.id" :label="item.name"
              :value="item.name"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <!-- <el-col :span="12">
        <el-form-item label="住址">
          <el-input v-model="form.zz" placeholder="请输入住址" />
        </el-form-item>
      </el-col> -->
      <el-col :span="12">
        <el-form-item label="地址" prop="hjdz">
          <el-input v-model="form.hjdz" placeholder="请输入户籍地址" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="出生日期" prop="csrq">
          <el-date-picker clearable v-model="form.csrq" type="date" value-format="yyyy-MM-dd"
            placeholder="请选择出生日期" style="width: 100%" ></el-date-picker>
        </el-form-item>
      </el-col>
      <!-- <el-col :span="12">
        <el-form-item label="单位及职务">
          <el-input v-model="form.dwzw" placeholder="请输入单位及职务" />
        </el-form-item>
      </el-col> -->
      <el-col :span="12">
        <el-form-item label="联系电话" prop="lxdh">
          <el-input v-model="form.lxdh" placeholder="请输入联系电话" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="委托交款人" prop="jkr">
          <el-input  v-model="form.jkr" placeholder="请输入委托交款人" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="委托交款人身份证号" prop="jkrsfz">
          <el-input  v-model="form.jkrsfz" placeholder="请输入委托交款人身份证号" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <!-- <el-col :span="12">
        <el-form-item label="案件性质" prop="ajxz" style="width: 100%">
          <el-input v-model="form.ajxz" placeholder="请输入案件性质" />
          <selectMultiple ref="selectMultiple" :options="directoryList" @selectVal="selectVal" :multiple="false"
            :isTree="true" selectableRange="code"  style="width: 100%"></selectMultiple>
        </el-form-item>
      </el-col> -->
      <el-col :span="24">
      <el-divider content-position="center">缴款信息</el-divider>
    </el-col>
    <el-col :span="12">
        <el-form-item label="收取方式" prop="sqfs">
          <el-select v-model="form.sqfs" placeholder="请选择收取方式"  style="width:100%">
            <el-option v-for="item in [{ id: 1, name: '线上' }, { id: 2, name: '线下收款' }]" :key="item.id" :label="item.name"
              :value="item.name"></el-option>
          </el-select>        </el-form-item>
      </el-col>
    <el-col :span="12">
        <el-form-item label="缴款人账户名称" prop="dsyhbh">
          <!-- <el-select v-model="form.dsyhbh" placeholder="请选择"  style="width:93%">
              <el-option  v-for="item in bankList" :key="item.yhbh"
                  :label="item.zhmc" :value="item.yhmc">
              </el-option>
          </el-select> -->
          <el-input v-model="form.dsyhbh" placeholder="请输入缴款人账户名称" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="缴款人开户行" prop="jnkhh">
          <el-input v-model="form.jnkhh" placeholder="请输入缴款人开户行" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="缴款人账户卡号" prop="jnkh">
          <el-input v-model="form.jnkh" placeholder="请输入缴款人账户卡号" style="width: 100%"/>
        </el-form-item>
      </el-col>



      <!-- <el-col :span="12">
        <el-form-item label="批准人">
          <el-input v-model="form.pzr" placeholder="请输入批准人" />
        </el-form-item>
      </el-col> -->
      <el-col :span="12">
        <el-form-item label="批准日期" prop="pzsj">
          <el-date-picker clearable v-model="form.pzsj" type="date" value-format="yyyy-MM-dd"  
            placeholder="请选择批准时间" style="width: 100%" ></el-date-picker>
        </el-form-item>
      </el-col>
      
      <!-- <el-col :span="12">
        <el-form-item label="收取日期">
          <el-date-picker clearable v-model="form.sqrq" type="date" value-format="yyyy-MM-dd" placeholder="请选择收取日期"></el-date-picker>
        </el-form-item>
        <el-form-item label="填报人">
          <el-input v-model="form.sqtfr" placeholder="请输入填报人" :disabled="true" />
        </el-form-item>
      </el-col> -->
      <el-col :span="12">
        <el-form-item label="填报时间" prop="sqtfsj">
          <el-date-picker clearable v-model="form.sqtfsj" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" 
            :disabled="true" placeholder="请选择填报时间" style="width: 100%" ></el-date-picker>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="保证金金额" prop="sqje" class="form-item" style="font-size: 18px;">
          <el-input v-model="form.sqje" placeholder="请输入保证金金额" style="width: 100%"/>
        </el-form-item>
      </el-col>
      <!-- <el-col :span="12">
        <el-form-item label="保证金类型" prop="bzjlx">
          <el-select v-model="form.bzjlx" placeholder="请选择保证金类型"  style="width:100%">
            <el-option v-for="item in [{ id: 1, name: '行政' }, { id: 2, name: '刑事' }]" :key="item.id" :label="item.name"
              :value="item.name"></el-option>
          </el-select>
        </el-form-item>
      </el-col> -->
      <el-col :span="24">
        <el-form-item label="附件选择" prop="files">
          <Upload v-model="form.files" :data="{}" :value="form.files" acceptTip="*仅图片、PDF类型文件可在线预览"
             multiple></Upload>
        </el-form-item>
      </el-col>
    
      </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

<!-- 双击页面 -->
    <el-dialog :title="tit" :visible.sync="doubleopen" width="60%" @closed="gb" >
      <el-form ref="forms1"  :model="form" :rules="ruless" label-width="auto" :hide-required-asterisk="true" class="creation demo-form-inline">
        <el-row :gutter="20">
          <el-col :span="24">

          <el-divider content-position="center">案件信息</el-divider>
          </el-col>
        <el-col :span="12" >
        <el-form-item label="案件编号" prop="ajbh">
          <el-input v-model="form.ajbh" placeholder="请输入案件编号" style="width: 100%":disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="案件名称" prop="ajmc">
          <el-input v-model="form.ajmc" placeholder="请输入案件名称" style="width: 100%":disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="案件性质" prop="ajxz" style="width: 100%">
          <el-input v-model="form.ajxz" placeholder="请输入案件性质" style="width: 100%":disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="决定文书号" prop="sqwsh">
          <el-input v-model="form.sqwsh" placeholder="请输入决定文书号" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="办案人" prop="bar">
          <el-input v-model="form.bar" placeholder="请输入办案人" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="办案人联系电话" prop="sq_barlxdh">
          <el-input v-model="form.sq_barlxdh" placeholder="请输入办案人联系电话" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="办案单位" prop="badw">
          <el-select v-model="form.badw" placeholder="请选择办案单位" style="width: 100%" :disabled="true">
            <el-option 
            v-for="item in options"
              :key="item.id" 
              :label="item.name" 
              :value="item.name"
            />
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="24">

      <el-divider content-position="center">个人信息</el-divider>
      </el-col>
      <el-col :span="12">
        <el-form-item label="被取保候审人(被行政拘留人)" prop="hsr">
          <el-input  v-model="form.hsr" placeholder="请输入被取保候审人(被行政拘留人)" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="人员类别" prop="xjr">
          <el-input  v-model="form.xjr" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="身份证号" prop="sfzh">
          <el-input v-model="form.sfzh" placeholder="请输入身份证号" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="护照号" prop="hsrhz">
          <el-input v-model="form.hsrhz" placeholder="请输入护照号" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
     <el-col :span="12">
        <el-form-item label="性别" prop="xb">
          <el-input v-model="form.xb"  style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="地址" prop="hjdz">
          <el-input v-model="form.hjdz" placeholder="请输入户籍地址" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="出生日期" prop="csrq">
          <el-input v-model="form.csrq" placeholder="请输入户籍地址" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="联系电话" prop="lxdh">
          <el-input v-model="form.lxdh" placeholder="请输入联系电话" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="委托交款人" prop="jkr">
          <el-input  v-model="form.jkr" placeholder="请输入委托交款人" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="委托交款人身份证号" prop="jkrsfz">
          <el-input  v-model="form.jkrsfz" placeholder="请输入委托交款人身份证号" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="24">
      <el-divider content-position="center">缴款信息</el-divider>
    </el-col>
    <el-col :span="12">
        <el-form-item label="收取方式" prop="sqfs">
          <el-input v-model="form.sqfs" placeholder="请输入缴款人账户名称" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
    <el-col :span="12">
        <el-form-item label="缴款人账户名称" prop="dsyhbh">
          <el-input v-model="form.dsyhbh" placeholder="请输入缴款人账户名称" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="缴款人开户行" prop="jnkhh">
          <el-input v-model="form.jnkhh" placeholder="请输入缴款人开户行" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="缴款人账户卡号" prop="jnkh">
          <el-input v-model="form.jnkh" placeholder="请输入缴款人账户卡号" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="批准日期" prop="pzsj">
          <el-date-picker clearable v-model="form.pzsj" type="date" value-format="yyyy-MM-dd"  
            placeholder="请选择批准时间" style="width: 100%"  :disabled="true"></el-date-picker>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="填报时间" prop="sqtfsj">
          <el-date-picker clearable v-model="form.sqtfsj" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" 
            :disabled="true" placeholder="请选择填报时间" style="width: 100%" ></el-date-picker>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="保证金金额" prop="sqje" class="form-item" style="font-size: 18px;">
          <el-input v-model="form.sqje" placeholder="请输入保证金金额" style="width: 100%" :disabled="true"/>
        </el-form-item>
      </el-col>
    
      </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="success" plain icon="el-icon-upload"  :disabled="!form.xh" @click="handleSubmit">提交收取审核</el-button>
        <el-button type="warning" @click="handleckfj(form)" >查看附件</el-button>
        <el-button type="primary" @click="handlecklc(form)" >查看流程</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>


    <el-dialog title="提交意见" :visible.sync="dialogSuggest" @close="dialogSuggest=false">
      <div style="display: flex;align-items: stretch;justify-content: space-evenly;flex-direction: column;height: 220px;">

      <div style="display: flex;align-items: center;justify-content: center;">
        <div>提交意见:</div>
        <el-input v-model="spyj" style="width: 85%;" :rows="5" type="textarea"></el-input>
      </div>
      <div style="display: flex;align-items: center;justify-content: center;">
        <div style="margin-left: 11px;">提交人:</div>
        <el-input v-model="spr" style="width: 40%;" :rows="5" type="text"></el-input>
        <div style="margin-left: 11px;">职务:</div>
          <el-select v-model="sprzw" style="width: 40%;" :rows="5" type="text"  clearable  placeholder="请选择职务">
            <!-- <el-option v-for="item in [{ id: 1, name: '局长' }, { id: 2, name: '副局长' }, { id: 3, name: '办案民警' }, { id: 4, name: '法制民警' }, { id: 5, name: '财务民警' }]" :key="item.id" :label="item.name"
              :value="item.name"></el-option> -->
              <el-option
          v-for="item in dict.type.sys_sprzw"
          :key="item.value"
          :label="item.label"
          :value="item.label"
        />
            </el-select>
      </div>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFormSuggest">确 定</el-button>
        <el-button @click="dialogSuggest=false">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog :visible.sync="pdfs" width="45%">
         <div style="display: flex;align-items: center;justify-content: center;">
          <img :src="this.pdfUrl" alt width="80%" />
         </div>
    </el-dialog>
    <el-dialog title="查看附件" :visible.sync="dialogFormVisible">
      <el-table height="600" border :data="fileList" :header-cell-style="{ backgroundColor: 'rgb(237 237 237)'}">
        <el-table-column label="文件名称" prop="fjmc" />
        <el-table-column label="环节" prop="lb" />
        <el-table-column label="文件类型" prop="wjlx" />
        <el-table-column fixed="right" label="操作" width="200">
          <template slot-scope="scope">
            <el-button type="success" plain size="mini" @click="handlexzfj(scope.row)" :disabled="!scope.row.wjdz" >下载附件</el-button>
            <el-button type="success" plain size="mini" @click="yul(scope.row)" :disabled="!(scope.row.wjdz.split('.')[1] == 'png' || scope.row.wjdz.split('.')[1] == 'jpg' || scope.row.wjdz.split('.')[1] == 'jpeg')" >预览</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog title="查看流程" :visible.sync="dialogFlowerTable"  @closed="dialogFlowerTable=false">
      <el-table height="600" border :data="flowerList" :header-cell-style="{ backgroundColor: 'rgb(237 237 237)'}">
        <el-table-column label="案件类别" prop="lb" hidden/>
        <el-table-column label="审批环节" prop="ajlx" />
        <el-table-column label="审批意见" prop="spyj" width="200"/>
        <el-table-column label="审批人" prop="spr" />
        <el-table-column label="审批人职务" prop="sprzw" width="100"/>
        <el-table-column label="审批单位" prop="spdw" width="200"/>
        <el-table-column label="审批时间" prop="spsj" width="180"/>
      </el-table>
    </el-dialog>




    <div ref="print" class="box" v-show="isShow">
      <div class="lf">
        <div class="heade">
          <h4>哈尔滨市公安局</h4>
          <h2>收取保证金通知书</h2>
          <p>(存根)</p>
        </div>
        <div class="cont">
          <el-form :model="form" label-width="90px">
            <el-form-item label="案件名称">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.ajmc }}</p>
            </el-form-item>
            <el-form-item label="案件编号">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.ajbh }}</p>
            </el-form-item>
            <el-form-item label="取保候审人">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.hsr }}</p>
            </el-form-item>
            <el-form-item label="出生日期">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.csrq }}</p>
            </el-form-item>
            <el-form-item label="地址">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.zz }}</p>
            </el-form-item>
            <el-form-item label="单位及职业">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.dwzw }}</p>
            </el-form-item>
            <el-form-item label="保证金数额">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.sqje }}</p>
            </el-form-item>
            <el-form-item label="保证金类型">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.bzjlx }}</p>
            </el-form-item>
            <!-- <el-form-item label="代收银行" >
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.ajmc }}</p>
            </el-form-item>-->
            <el-form-item label="收取时间">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.sqrq }}</p>
            </el-form-item>
            <el-form-item label="批准人">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.pzr }}</p>
            </el-form-item>
            <!-- <el-form-item label="批准时间" >
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.ajmc }}</p>
            </el-form-item>-->
            <el-form-item label="办案人">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.bar }}</p>
            </el-form-item>
            <el-form-item label="办案单位">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.badw }}</p>
            </el-form-item>
            <el-form-item label="填发时间">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.sqtfsj }}</p>
            </el-form-item>
            <el-form-item label="填发人">
              <p style="border-bottom: 1px solid #dcdfe6">{{ this.form.sqtfr }}</p>
            </el-form-item>
          </el-form>
        </div>
      </div>
      <div class="lr">
        <div class="heade">
          <h4>哈尔滨市公安局</h4>
          <h2>收取保证金通知书</h2>
        </div>
        <div class="cont">
          <div class="line">{{ this.form.ajbh }}：</div>
          <p class="text">
            根据《中华人民共和国刑事诉讼法》第六十八条、
            第七十二条之规定，请持此通知书于{{ this.form.jnsj }}
            日之前到银行交纳取保候审保证金（大写）{{ convertToUppercase(this.form.sqje) }}元
          </p>
          <div class="footer">
            <p>哈尔滨市公安局</p>
            <p>{{parseTime(this.form.sqtfsj, '{y}-{m}-{d}') }}</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { listBzjtable,  delBzjtable, addBzjtable, updateBzjtable, addAjxzTree,listBasic ,getIdDetail,downLoadFile,getFjList,getListByXhDetail,sqsh} from "@/api/system/bzjtable"
import selectMultiple from '@/views/collect/addSecurity/selectMultiple'
import Print from '@/utils/print.js'
import { saveAs } from 'file-saver'
import Upload from './Upload'
import {  blobValidate } from "@/utils/ruoyi";

export default {
  name: "Bzjtable",
  dicts: ['sys_type','sys_sprzw'],
  data() {
    let dialogVisible = (rule, val, callback) => {
      if (!val) callback(new Error('请输入手机号'))
      let exp = new RegExp(/^1[0-9]{10}$/)
      if (!exp.test(val)) {
        return callback(new Error('手机号格式不对'))
      }
      return callback()
    }
    let dialogVisible1 = (rule, val, callback) => {
      if (!val) callback(new Error('请输入身份证号'))
      let exp = new RegExp(/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/)
      if (!exp.test(val)) {
        return callback(new Error('身份证号格式不对'))
      }
      return callback()
    }
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      directoryList: [],
      bankList:[],
      fileList: [],
      flowerList:[],  
      isShow: false,
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 【请填写功能名称】表格数据
      bzjtableList: [],
      // 弹出层标题
      tit: "",
      // 是否显示弹出层
      doubleopen:false,
      open: false,
      dialogSuggest:false,
      dialogFormVisible: false,
      pdfs: false,
      dialogFlowerTable:false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        sqshzt: '0',
        hsr: null,
        ajbh : null,
        sqwsh : null,
      },
      spyj:'',
      spr:'',
      sprzw: '',
      wjdz: '',
      pdfUrl: '',
      // formInfo: {},
      // 表单参数
      form: {
        lxdh: '',
        sfzh: '',
        sqtfr: this.$store.state.user.nickName,
        bar:this.$store.state.user.nickName,
        badw:this.$store.state.user.deptName,
        dsyhbh:this.$store.state.user.yhmc,
        sqtfsj: this.getNowFormatDate(),
        sqzt : null,
        thzt : null,
        thshzt : null,
        mszt : null,
        msshzt :null,
        hbzt :null
      },
      form1:{
        sfzh: '',
        xb: '',
        csrq: '',

      },
      currentIndex: '',
      // 表单校验
      ruless: {
        ajbh: [{ required: true, trigger: 'change',message: '请输入案件编号' }],
        ajmc: [{ required: true, trigger: 'change',message: '请输入案件名称' }],
        hsr: [{ required: true, trigger: 'change',message: '请输入被取保候审人' }],
        // hsrhz: [{ required: true, trigger: 'change',message: '请输入护照号' }],
        jkr: [{ required: true, trigger: 'change',message: '请输入委托交款人' }],
        jkrsfz: [{ required: true, validator: dialogVisible1, trigger: 'change' }],
        xjr: [{ required: true, trigger: 'change',message: '请输入行政拘留人' }],
        xb: [{ required: true, trigger: 'change',message: '请输入性别' }],
        hjdz: [{ required: true, trigger: 'change',message: '请输入户籍地址' }],
        csrq: [{ required: true, trigger: 'change',message: '请输入出生日期' }],
        bar: [{ required: true, trigger: 'change',message: '请输入办案人' }],
        badw: [{ required: true, trigger: 'change',message: '请输入办案单位' }],
        sqtfsj: [{ required: true, trigger: 'change',message: '请输入填发时间' }],
        files: [{ required: true, trigger: 'change',message: '请输入选择附件' }],
        ajxz: [{ required: true, trigger: 'change',message: '请选择案件性质' }],
        sqje: [{ required: true, trigger: 'change',message: '请输入保障金金额' }],
        bzjlx: [{ required: true, trigger: 'change',message: '请选择保障金类型' }],
        sqwsh: [{ required: true, trigger: 'change',message: '请输入收取法律文书号' }],
        pzsj: [{ required: true, trigger: 'change',message: '请输入批准时间' }],
        dsyhbh: [{ required: true, trigger: 'change',message: '请输入缴款人账户名称' }],
        jnkh: [{ required: true, trigger: 'change',message: '请输入缴款人账户卡号' }],
        jnkhh: [{ required: true, trigger: 'change',message: '请输入缴款人开户行' }],
        
        lxdh: [{ required: true, validator: dialogVisible, trigger: 'change' }],
        sq_barlxdh: [{ required: true, validator: dialogVisible, trigger: 'change' }],
        sfzh: [{ required: true, validator: dialogVisible1, trigger: 'change' }]
      },
      options:[{ id: 1, name: '黑河市公安局直属分局'},  
      { id: 2, name: '黑河市公安局法制大队'}, 
      { id: 2, name: '哈尔滨市公安局直属分局'},]
    };
  },
  components: {
    selectMultiple,
    Upload
  },
  created() {
    this.getList();
    console.log(this.$store.state.user,"11111")
  },
  methods: {
    parseIdCard() {  
    const idCard = this.form.sfzh;  
    if (idCard.length === 18) {  
      const genderCode = idCard.substr(16, 1); // 18位身份证的性别码在第17位  
      const gender = genderCode % 2 === 0 ? '女' : '男';  
      const birthdate = `${idCard.substr(6, 4)}-${idCard.substr(10, 2)}-${idCard.substr(12, 2)}`;  
        
      this.form.xb = gender;  
      this.form.csrq = birthdate;  
    }  
  },
  submitFormSuggest() {
      if(!this.spyj){
        return this.$message.error('请输入意见')
      }
      if(!this.spr){
        return this.$message.error('请输入提交人')
      }
      if(!this.sprzw){
          return this.$message.error('请选择审批人职务')
        }
      if (this.form.xh != null) {
        this.form.sqshzt = 1
        this.form.spyj = this.spyj
        this.form.spr = this.spr
        this.form.sprzw = this.sprzw
        sqsh(this.form).then(response => {
          this.$modal.msgSuccess("提交成功");
          this.dialogSuggest =false
          this.doubleopen = false
          this.getList();
        });
      }
    },
        //查看附加
        handleckfj(row) {
      this.dialogFormVisible = true
      getFjList({ xh: row.xh }).then((res) => {
        this.fileList = res.rows
        // this.fileList.forEach((item) => {
        //   item.typeName = this.dict.type.sys_type.filter((e) => item.wjlx == e.value)[0].label
        // })
      })
    },
    handlecklc(row) {
      console.log("row",row);
      this.dialogFlowerTable = true
      getListByXhDetail(row.xh,1).then((res) => {
        this.flowerList = res.rows
      })
    },
    handlexzfj(val) {
      // this.download('/confiscate/forfeitureOfDeposit/downLoadFile', { wjdz: this.form.wjdz }, `role_${new Date().getTime()}.png`)
      downLoadFile({ wjdz: val.wjdz }).then(async (data) => {
        this.$modal.msgSuccess("下载成功");
        const url = window.URL.createObjectURL(data);
        this.pdfUrl = url;//直接用iframe标签
        const isBlob = blobValidate(data);
        if (val.wjdz && val.wjdz.split('.')[1] == 'png' || val.wjdz &&val.wjdz.split('.')[1] == 'jpg' || val.wjdz &&val.wjdz.split('.')[1] == 'jpeg') {
          if (isBlob) {
            const blob = new Blob([data])
            saveAs(blob, `role_${new Date().getTime()}.png`)
          } else {
            const resText = await data.text();
            const rspObj = JSON.parse(resText);
            const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
            Message.error(errMsg);
          }
        } else if (val.wjdz &&val.wjdz.split('.')[1] == 'pdf') {
          // let pdfUrl = window.URL.createObjectURL(new Blob([data], { type: "application/pdf" }));
          // window.open(pdfUrl)
          let blob = new Blob([data], { type: 'application/pdf' });
          let downloadElement = document.createElement("a");
          let href = window.URL.createObjectURL(blob); //创建下载的链接
          downloadElement.href = href;
          downloadElement.download = `pdf下载`    //下载后的文件名，根据需求定义
          document.body.appendChild(downloadElement);
          downloadElement.click(); //点击下载
          document.body.removeChild(downloadElement); //下载完成移除元素
          window.URL.revokeObjectURL(href); //释放掉blob对象
        } else {
          const blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) // response就是接口返回的文件流
          const objectUrl = URL.createObjectURL(blob)
          const a = document.createElement('a') // 创建a标签
          a.href = objectUrl
          a.download = 'excel下载' // 自定义文件名
          a.click() // 下载文件
          window.URL.revokeObjectURL(objectUrl) // 释放内存
          // link.remove()
        }
        this.dialogFormVisible = false
      })
    },
    yul(val) {
      downLoadFile({ wjdz: val.wjdz }).then(async (data) => {
        // if (this.wjdz && this.wjdz.split('.')[1] == 'png' || this.wjdz &&this.wjdz.split('.')[1] == 'jpg' || this.wjdz.split('.')[1] == 'jpeg') {
          const url = window.URL.createObjectURL(data);
          this.pdfUrl = url;//直接用iframe标签
          this.pdfs = true
        // }
      })
    },
    /** 查询【请填写功能名称】列表 */
    getList() {
      console.log(this.$store.state.user)
      this.loading = true;
      listBzjtable(this.queryParams).then(response => {
        response.rows.forEach((item, index) => {
          item.pIndex = index + 1
        })
        this.bzjtableList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
      addAjxzTree({}).then((res) => {
        this.directoryList = res.map(item => {
          item.level = 1
          item.name = item.label
          item.value = item.id
          item.children && item.children.forEach((i) => {
            i.level = 2
            i.name = i.label
            i.value = i.id
            if (i.children && i.children.length) {
              i.children.forEach((k) => {
                k.level = 3
                k.name = k.label
                k.value = k.id
              })
            }
          })
          // this.recursionFun(item)
          return item
        })
      })
      listBasic({}).then((res) => {
        this.bankList = res.rows
      })
    },
    // recursionFun(item) {
    //   if (item.children) {
    //     item.children.map(it => {
    //       it.name = it.label
    //       it.value = it.id
    //       this.recursionFun(it)
    //       return it
    //     })
    //   } else {
    //     return
    //   }
    // },
    // 取消按钮
    cancel() {
      this.open = false;
      this.doubleopen = false;
      this.reset();
    },
    /**双击操作 */
    doubleclick(row,event){
      this.form = row;
      this.doubleopen = true;
    },
     convertToUppercase(number) {
        const lowercaseDigits = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"];
        const uppercaseDigits = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"];

        const numberString = String(number);
        let result = "";

        for (let i = 0; i < numberString.length; i++) {
          const digit = parseInt(numberString[i]);
          result += uppercaseDigits[digit];
        }

        return result;
      },
    gb() {
      this.getList();
    },
    handleSubmit(){
      this.dialogSuggest =true
    },
    selectVal(val) {
      this.form.ajxz = val
      // this.catalogId = val?this.$refs.selectMultiple.selectTree:'';
      // let codePrefix = this.$refs.selectMultiple.selectData.codePrefix || this.formData.codePrefix;
      // if(!this.formData.code.startsWith(codePrefix)){
      //   this.getCode(this.$refs.selectMultiple.selectData.codePrefix)
      // }
      // if(this.formData.name){
      //   this.$refs.form.validateField('name');
      // }
    },
    // 表单重置
    reset() {
      this.form = {
        xh: null,
        ajbh: null,
        ajmc: null,
        sqwsh: null,
        hsr: null,
        xjr: null,
        xb: null,
        csrq: null,
        zz: null,
        hjdz: null,
        dwzw: null,
        lxdh: null,
        sfzh: null,
        ajxz: null,
        sqje: null,
        bzjlx : null,
        sqfs: null,
        sqzt: null,
        jkr: null,
        jkrsfz: null,
        dsyhbh: this.$store.state.user.yhmc,
        jnsj: null,
        jnkh: null,
        pzr: null,
        pzsj: null,
        // bar: this.$store.state.user.nickName,
        bar: null,
        sq_barlxdh: null,
        dwbh: this.$store.state.user.deptId,
        badw: null,
        sqrq: null,
        sqtfsj: this.getNowFormatDate(),
        sqtfr: this.$store.state.user.nickName,
        msje: null,
        mszt: null,
        msyy: null,
        mswsh: null,
        mspzr: null,
        mspzsj: null,
        mstfr: null,
        msrq: null,
        mstfsj: null,
        msshzt: null,
        mskhzt: null,
        mskhsj: null,
        mskhczr: null,
        thje: null,
        thfs: null,
        thzt: null,
        thrq: null,
        thwsh: null,
        thpzr: null,
        thtfsj: null,
        thshzt: null,
        thshr: null,
        thshsj: null,
        thxm: null,
        thzh: null,
        thkhh: null,
        djzt: null,
        sqdyzt: null,
        djsj: null,
        sqkpzt: null,
        thkpzt: null,
        hbwsh: null,
        hbdw: null,
        hbje: null,
        hbry: null,
        hbrq: null,
        hblxdh: null,
        hbsj: null,
        hbczy: null
      };
      this.resetForm("forms");
      this.resetForm("forms1");
    },
    tableRowClassName({ row, column, rowIndex, columnIndex }) {
      //逻辑判断决定是否修改样式，如果分组一致则使用同一个样式
      return row.pIndex == this.currentIndex ? 'hover-bg' : ''
    },
    tableCurrentChange(row) {
      // this.form = row
      getIdDetail(row.xh).then((res) => {
        this.form = res.data
        this.form.files.forEach((item) => {
          item.newFileName = item.fjmc
          item.fileType = item.wjlx
        })
      })
      this.currentIndex = row?.pIndex
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.queryParams.sqshzt = '0'
      this.queryParams.hsr = ''
      this.queryParams.ajbh = ''
      this.queryParams.sqwsh = ''
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.xh)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.tit = "添加案件";
      this.$nextTick(() => {
        this.$refs.selectMultiple.value = null;
      })
      this.reset();
      this.open = true;
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.tit = "修改案件";
      this.$nextTick(() => {
        this.$refs.selectMultiple.value = this.form.ajxz;
      })
      this.open = true;
      // this.reset();
      // const XH = row.XH || this.ids
      // getBzjtable(XH).then(response => {
      //   this.form = response.data;
      //   this.open = true;
      // });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs.forms.validate(valid => {
        if (valid) {
          let flag = true
          this.form.files.forEach((item) => {
            if (!item.fileType) {
              flag = false
              this.$modal.msgError("请选择附件类型");
              return
            }
          })
          if (flag) {
            if (this.form.xh != null) {
              this.form.files.forEach((item)=>{
                item.wjlx = item.fileType
              })
              updateBzjtable(this.form).then(response => {
                this.$modal.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              });
            } else {
              this.form.sqzt = 0
              this.form.sqshzt = 0
              this.form.thzt = 0
              this.form.thshzt = 0
              this.form.mszt = 0
              this.form.msshzt = 0
              this.form.hbzt = 0
              this.form.hbshzt = 0
              addBzjtable(this.form).then(response => {
                this.$modal.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              });
            }
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      // const XHs = row.XH || this.ids;
      // this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + this.form.xh + '"的数据项？').then(function () {
      //   return delBzjtable(this.form.xh);
      // }).then(() => {
      //   this.getList();
      //   this.$modal.msgSuccess("删除成功");
      // }).catch(() => { });

      this.$confirm('是否确认删除案件 编号为"' + this.form.ajbh + '"的数据项？', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        delBzjtable(this.form.xh).then(res => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
      }).catch(() => { });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.isShow = true
      console.log(this.$refs.print);
      this.$nextTick(() => {
        Print(this.$refs.print)
        this.isShow = false
      })
      // this.download('system/bzjtable/export', {...this.queryParams}, `bzjtable_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
<style rel="stylesheet/scss" lang="scss">
@page {
  size: 1220px 880px;
  margin-top: 0mm;
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
.creation {
  // padding: 10px;
  .el-form-item {
    margin-bottom: 15px;
  }

  // .xx {
  //   ::v-deep.el-input__inner {
  //     width: 630px;
  //   }
  // }
}

::v-deep .el-table__body-wrapper::-webkit-srollbar-track {
  background-color: rgba(255, 255, 255, 0);
}

//可设置胶囊宽高
::v-deep .el-table__body-wrapper::-webkit-scrollbar {
  height: 12px;
  width: 10px;
  opacity: 0.5;
}

// 设置胶囊色
::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
  border-radius: 15px;
  background-color: #cdd9e6;
}

.box {
  display: flex;
  justify-content: center;
  padding: 40px;
  height: 800px;

  .heade {
    text-align: center;

    >h4 {
      font-weight: 600;
    }

    >h2 {
      margin: 6px 0 5px 0;
      font-weight: 600;
    }
  }

  .cont {
    margin-top: 30px;

    .line {
      width: 150px;
      height: 20px;
      text-align: right;
      margin-left: 30px;
      border-bottom: 1px solid #000;
    }

    .text {
      text-indent: 24px;
      width: 400px;
      line-height: 40px;
      // margin-top: 50px;
      margin: 20px auto;
    }

    .footer {
      width: 400px;
      margin-top: 50px;
      float: right;
      text-align: center;
    }
  }

  .lf {
    width: 300px;
    border: 1px solid #000;
    margin-right: 50px;
    padding: 6px;
  }

  .lr {
    width: 600px;
    padding: 6px;
    border: 1px solid #000;
  }

  ::v-deep.el-form-item {
    margin-bottom: 0;
  }

  // .noBorder {

  //   ::v-deep.el-input__inner:focus {
  //     box-shadow: 0 0 0 0 !important;
  //   }

  //   ::v-deep.el-input__inner {
  //     border-radius: 0 !important;
  //     border: none !important;
  //     border-bottom: 1px solid #dcdfe6 !important;
  //   }
  // }
}

::v-deep .el-table__body .el-table__row.hover-bg td {
  background-color: #cde6f7 !important;
}
::v-deep .date-form-item {
  width: 100%;
}
::v-deep .date-form-item .el-input__wrapper {
  width: 100%;
}
::v-deep .demo-form-inline .el-input {
  --el-input-width: 220px !important;
}
.form-item{
  ::v-deep .el-form-item__label {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #000 !important;
  }
  ::v-deep .el-input--medium .el-input__inner {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #000 !important;
  }
}
</style>